/*
 * File Name     : @(#)AbstractModel.java
 * Creation Date : Mar 2, 2009
 * Author        : anirudh
 * 
 * Copyright 2009 Anirudh Vyas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package hcis.model.impl;

import hcis.model.IModel;
import hcis.model.annotation.HCISEntity;
import hcis.model.annotation.Id;

import java.io.Serializable;

/**
 * Base abstract model type serves as the most basic implementation for {@link hcis.model.IModel}.
 * 
 * @author anirudh
 * @param <ID>
 *            id type.
 */
@HCISEntity(name = "abstractModel", description = "abstract model serves as a base class for all the other models providing with default functionality")
public abstract class AbstractModel<ID extends Serializable> implements IModel<ID> {

	/**
	 * Default serial version UID.
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Identifier for the abstract model.
	 */
	@Id
	public ID id;

	/**
	 * Gets the id.
	 * 
	 * @return the id to get.
	 */
	public final ID getId() {
		return id;
	}

	/**
	 * Sets the id.
	 * 
	 * @param pId
	 *            the id to set.
	 */
	public final void setId(final ID pId) {
		this.id = pId;
	}
}
